﻿using System;
using System.Text.RegularExpressions;

namespace YJKRoomInspection.ShowDataForm
{
	internal static class UtiltiyTools
	{
		public static bool IsValidFireDoorWinFamilyName(string strFamilyName)
		{
			return Regex.IsMatch(strFamilyName, "防火|FM|fm|FJM|fjm|FC|fc");
		}

		public static bool IsValidDoorRollingFamilyName(string strFamilyName)
		{
			return UtiltiyTools.IsValidFireDoorWinFamilyName(strFamilyName) && Regex.IsMatch(strFamilyName, "卷帘");
		}

		public static bool IsValidDoorWinClassAFamilyName(string strFamilyName, string strSymbolName)
		{
			return (UtiltiyTools.IsValidFireDoorWinFamilyName(strFamilyName) && !Regex.IsMatch(strFamilyName, "乙|丙") && !Regex.IsMatch(strSymbolName, "乙|丙")) || (UtiltiyTools.IsValidFireDoorWinFamilyName(strSymbolName) && !Regex.IsMatch(strFamilyName, "乙|丙") && !Regex.IsMatch(strSymbolName, "乙|丙"));
		}
	}
}
